﻿/// <reference path="_namespace.js" />
//TODO: Ensure _namespace.js exists and contains our namespace and all library references.
//TODO: Change (global replace) "myAjaxApp" Application namespace to your preference.

/*****************************************************************************
Ajaxna library class definition. Inheriting from ajax.xna.framework.Game.
Author: $username$ $time$.
Class:  myAjaxApp.$fileinputname$
*****************************************************************************/

$addNamespace("myAjaxApp");
$imports("ajax.xna.framework.GraphicsDeviceManager");
//-----------------------------------------------------------------------------

myAjaxApp.$fileinputname$ = function(doc)
{///<summary>Creates a new instance of the myAjaxApp.$fileinputname$ game class.</summary>
    myAjaxApp.$fileinputname$.superConstructor.call(this, doc);
    
    this.graphics = new ajax.xna.framework.GraphicsDeviceManager(this);    
}
//-----------------------------------------------------------------------------
$extend("myAjaxApp.$fileinputname$", "ajax.xna.framework.Game");    // Inherits from ajax.xna.Game
if ($getDesignMode()) myAjaxApp.$fileinputname$.prototype = ajax.xna.framework.Game.prototype; // Enable local intellisense.
//-----------------------------------------------------------------------------


// Public members
//-----------------------------------------------------------------------------
myAjaxApp.$fileinputname$.prototype.graphics = ajax.xna.framework.GraphicsDeviceManager.prototype;


// Public Methods & overrides 
//-----------------------------------------------------------------------------
myAjaxApp.$fileinputname$.prototype.initialize = function()
{/// <summary>Allows the game to perform any initialization it needs to before starting to run.</summary>

    // TODO: Add your one time initialization code here 
         
    myAjaxApp.$fileinputname$.superClass.initialize.call(this);                 
}
//-----------------------------------------------------------------------------

myAjaxApp.$fileinputname$.prototype.update = function(gameTime)
{          
    gameTime = ajax.drawing.Timer.cast(gameTime);    
    // TODO: Add your Update code here

    myAjaxApp.$fileinputname$.superClass.update.call(this, gameTime); 
}
//-----------------------------------------------------------------------------

myAjaxApp.$fileinputname$.prototype.draw = function(gameTime)
{            
    gameTime = ajax.drawing.Timer.cast(gameTime);

    this.graphicsDevice.clear(ajax.drawing.Colour.cornflowerBlue()); 
           
    // TODO: Add your drawing code here

    myAjaxApp.$fileinputname$.superClass.draw.call(this, gameTime);                  
}
//-----------------------------------------------------------------------------

myAjaxApp.$fileinputname$.prototype.dispose = function()
{
    // TODO: Cleanup your NON GAME COMPONENT objects here (eg Sounds!). Note: All items in the Components array are cleaned for you.
    myAjaxApp.$fileinputname$.superClass.dispose.call(this);
}

//-----------------------------------------------------------------------------
// Always provide a static cast method to your classes
myAjaxApp.$fileinputname$.cast = function(obj)
{///<returns type="myAjaxApp.$fileinputname$"/>
    return obj;
}